#ifndef TCPSERVER_H
#define TCPSERVER_H
#include <iostream>
#include <QString>
#include <QTcpServer>
#include <QTcpSocket>

using namespace std;
class TcpServer
{
public:
    //创建SOCKET
    TcpServer();
    ~TcpServer();
    //创建,绑定，监听一起完成
    void NewTcpServer(quint16 port = 36000);

    //创建接收客户端的SOCKT
    QTcpSocket* NewTcpSocket();


private:   
    //定义一个tcpSocket
    QTcpSocket* m_TcpSocket=nullptr;
    //定义一个tcpServer
    QTcpServer* m_TcpServer = nullptr;

    //服务器IP地址结构

};

#endif // TCPSERVER_H
